<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('订单发货')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-delivery-add" th:object="${jtOrder}">
            <input type="hidden" name="orderId" th:value="*{orderId}"/>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{orderNo}]]：</label>
                    <div class="col-sm-8">
                        <span th:text="*{orderNo}"></span>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{logisticsCompany}]]：</label>
                    <div class="col-sm-8">
                        <select name="logisticsCompany" th:th class="form-control noselect2 selectpicker" required>
                            <option value="">--请选择--</option>
                            <option th:each="item : ${deliveryList}" th:value="${item.name}" th:text="${item.name}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{trackingNo}]]：</label>
                    <div class="col-sm-8">
                        <input name="trackingNumber" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/order"
        $("#form-rating-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/delivery", $('#form-delivery-add').serialize());
            }
        }
    </script>
</body>
</html>